package com.zb.controller;

import com.zb.dto.DeviceFullInfo;
import com.zb.service.TbGpsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName TbGpsController
 * @Description 控制器
 * @Author xm
 * @Date 2024/08/15 08:54
 **/
@RestController
@RequestMapping("/tb-gps-model")
@Api(value = "TbGpsController", tags = {"GPS控制器"})
public class TbGpsController {

    @Autowired
    public TbGpsService tbGpsModelService;

    @GetMapping("/device-full")
    public List<DeviceFullInfo> getDeviceFullInfo(@RequestParam("lat") Double lat, @RequestParam("lon") Double lon, @RequestParam("distance") Integer distance) {
        return tbGpsModelService.getDeviceFullInfo(lat, lon, distance);
    }

}
